package com.ityls.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.elasticsearch.annotations.CompletionField;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.core.suggest.Completion;

@Document(indexName = "news")
@Data
public class News {
    @Id
    @Field
    private Integer id;
    @Field
    private String title;
    @Field
    private String content;
    @Field
    private String url;
    @CompletionField
    @Transient
    private Completion tags;
}
